#ifndef _EEPROM_H_
#define _EEPROM_H_

#include "common.h"

#define EEPROM_BEGIN	0x8000
#define EEPROM_END		0xffff

void eeprom_read_prepare();
u8 eeprom_read(u16 addr);
void eeprom_read_buf(u16 addr, u8 *buf, u16 len);

void eeprom_write_prepare();
void eeprom_write(u16 addr, u8 value);
void eeprom_write_sync();
void eeprom_write_buf(u16 addr, u8 *buf, u16 len);

#endif